# Copyright 2024-2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_cc//cc:cc_library.bzl", "cc_library")

package(
    default_visibility = ["//ink:__subpackages__"],
)

cc_library(
    name = "native",
    visibility = ["//visibility:public"],
    deps = [
        ":canvas_mesh_renderer_jni",
    ],
    alwayslink = 1,
)

cc_library(
    name = "canvas_mesh_renderer_jni",
    srcs = ["canvas_mesh_renderer_jni.cc"],
    deps = [
        "//ink/geometry:mesh_format",
        "//ink/geometry/internal/jni:mesh_format_jni_helper",
        "//ink/jni/internal:jni_defines",
        "//ink/jni/internal:jni_throw_util",
        "//ink/rendering/skia/common_internal:mesh_specification_data",
        "@com_google_absl//absl/status:statusor",
        "@com_google_absl//absl/strings:string_view",
        "@com_google_absl//absl/types:span",
    ] + select({
        "@platforms//os:android": [],
        "//conditions:default": [
            "@rules_jni//jni",
        ],
    }),
    alwayslink = 1,
)
